gtk4.git
5 years agoMerge branch 'wip/nacho/associated-device' into 'master'
Matthias Clasen [Thu, 7 Jan 2021 21:08:46 +0000 (21:08 +0000)]
Merge branch 'wip/nacho/associated-device' into 'master'

gdkdevice: use g_set_object to set the associated device

See merge request GNOME/gtk!3049

5 years agoMerge branch 'mcatanzaro/company-unparent-warning' into 'master'
Matthias Clasen [Thu, 7 Jan 2021 18:37:28 +0000 (18:37 +0000)]
Merge branch 'mcatanzaro/company-unparent-warning' into 'master'

Add critical if widget has a parent during dispose

See merge request GNOME/gtk!3053

5 years agoMerge branch 'mcatanzaro/unparent' into 'master'
Matthias Clasen [Thu, 7 Jan 2021 18:35:37 +0000 (18:35 +0000)]
Merge branch 'mcatanzaro/unparent' into 'master'

Remove incorrect unparenting guidance from migration guide

See merge request GNOME/gtk!3050

5 years agoMerge branch 'mcatanzaro/gtkbuilder-docs' into 'master'
Matthias Clasen [Thu, 7 Jan 2021 18:00:19 +0000 (18:00 +0000)]
Merge branch 'mcatanzaro/gtkbuilder-docs' into 'master'

Improve GtkBuilder documentation

See merge request GNOME/gtk!3055

5 years agoMerge branch 'mcatanzaro/event-controller-porting-guide' into 'master'
Matthias Clasen [Thu, 7 Jan 2021 17:55:38 +0000 (17:55 +0000)]
Merge branch 'mcatanzaro/event-controller-porting-guide' into 'master'

Expand event controller API changes section of GTK 4 porting guide

See merge request GNOME/gtk!3054

5 years agoRemove incorrect unparenting guidance from migration guide
Michael Catanzaro [Thu, 7 Jan 2021 15:42:08 +0000 (09:42 -0600)]
Remove incorrect unparenting guidance from migration guide

This rule is almost always wrong, and we're having some trouble agreeing
on replacement text. Let's remove the whole paragraph for now, to avoid
confusion.

5 years agoAdd critical if widget has a parent during dispose
Benjamin Otte [Thu, 7 Jan 2021 15:49:52 +0000 (09:49 -0600)]
Add critical if widget has a parent during dispose

This is a refcounting bug. Be very verbose about it instead of trying to
call a function that releases a reference to the widget without
references.

5 years agogtkbuilder: fix recommendations that no longer make sense in GTK 4
Michael Catanzaro [Thu, 7 Jan 2021 17:30:57 +0000 (11:30 -0600)]
gtkbuilder: fix recommendations that no longer make sense in GTK 4

In GTK 3, it was pretty much always better to use
gtk_builder_new_from_whatever() rather than
gtk_builder_add_from_whatever(). But in GTK 4, this is no longer
generally true. Let's add some context on when you want to use one or
the other.

5 years agoAdd section on GtkBuilder API changes to GTK 4 migration guide
Michael Catanzaro [Thu, 7 Jan 2021 17:18:34 +0000 (11:18 -0600)]
Add section on GtkBuilder API changes to GTK 4 migration guide

Thanks to Benjamin for helping with the language.

5 years agoMerge branch 'ebassi/ci-only' into 'master'
Emmanuele Bassi [Thu, 7 Jan 2021 17:17:44 +0000 (17:17 +0000)]
Merge branch 'ebassi/ci-only' into 'master'

ci: Specify `only` for other jobs

See merge request GNOME/gtk!3052

5 years agoExpand event controller API changes section of GTK 4 porting guide
Michael Catanzaro [Thu, 7 Jan 2021 16:53:09 +0000 (10:53 -0600)]
Expand event controller API changes section of GTK 4 porting guide

There is more to say about changes to GtkEventController.

5 years agoci: Only run macOS job on upstream branches
Emmanuele Bassi [Thu, 7 Jan 2021 16:14:04 +0000 (16:14 +0000)]
ci: Only run macOS job on upstream branches

Don't run CI on macOS for forks.

5 years agoci: Specify `only` for other jobs
Emmanuele Bassi [Thu, 7 Jan 2021 16:03:10 +0000 (16:03 +0000)]
ci: Specify `only` for other jobs

Otherwise MRs will only run macOS jobs.

5 years agogdkdevice: use g_set_object to set the associated device
Ignacio Casal Quinteiro [Thu, 7 Jan 2021 15:13:39 +0000 (16:13 +0100)]
gdkdevice: use g_set_object to set the associated device

5 years agoMerge branch 'wip/jimmac/flat-buttons' into 'master'
Matthias Clasen [Thu, 7 Jan 2021 13:42:42 +0000 (13:42 +0000)]
Merge branch 'wip/jimmac/flat-buttons' into 'master'

Adwaita: fine tune flat button styling

Closes #3481

See merge request GNOME/gtk!3046

5 years agoMerge branch 'wip/jimmac/hc-switch-border' into 'master'
Matthias Clasen [Thu, 7 Jan 2021 13:41:40 +0000 (13:41 +0000)]
Merge branch 'wip/jimmac/hc-switch-border' into 'master'

HC: switch border color

Closes #3460

See merge request GNOME/gtk!3048

5 years agoMerge branch 'wip/nacho/tool-api' into 'master'
Matthias Clasen [Thu, 7 Jan 2021 13:25:11 +0000 (13:25 +0000)]
Merge branch 'wip/nacho/tool-api' into 'master'

seat: improve api to take into account the tool type

See merge request GNOME/gtk!3047

5 years agoseat: improve api to take into account the tool type
Ignacio Casal Quinteiro [Thu, 7 Jan 2021 11:27:26 +0000 (12:27 +0100)]
seat: improve api to take into account the tool type

Otherwise if we have several tools with the same serial
and hardware id we might match the wrong tool.

5 years agoHC: switch border color
Jakub Steiner [Thu, 7 Jan 2021 11:44:53 +0000 (12:44 +0100)]
HC: switch border color

- lighten inverted HC borders while darkening the regular/light variant

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3460

5 years agoAdwaita: fine tune flat button styling
Jakub Steiner [Thu, 7 Jan 2021 11:12:55 +0000 (12:12 +0100)]
Adwaita: fine tune flat button styling

- enough contrast for hover and active, while noticably different in
  normal nad headerbar context (and both light and dark variants).

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3481

5 years agoMerge branch 'X11-surface' into 'master'
Matthias Clasen [Wed, 6 Jan 2021 22:13:02 +0000 (22:13 +0000)]
Merge branch 'X11-surface' into 'master'

x11: fix crash on idle compute size without layout

See merge request GNOME/gtk!3031

5 years agoMerge branch 'wip/exalm/headerbar' into 'master'
Matthias Clasen [Wed, 6 Jan 2021 22:10:25 +0000 (22:10 +0000)]
Merge branch 'wip/exalm/headerbar' into 'master'

headerbar: Prepend start window controls instead of appending

See merge request GNOME/gtk!3044

5 years agoUpdate Catalan translation
Jordi Mas [Wed, 6 Jan 2021 21:42:44 +0000 (22:42 +0100)]
Update Catalan translation

5 years agoheaderbar: Prepend start window controls instead of appending
Alexander Mikhaylenko [Wed, 6 Jan 2021 17:04:55 +0000 (22:04 +0500)]
headerbar: Prepend start window controls instead of appending

Make sure they are always in the correct position.

5 years agoMerge branch 'macos-ci' into 'master'
Matthias Clasen [Wed, 6 Jan 2021 14:52:11 +0000 (14:52 +0000)]
Merge branch 'macos-ci' into 'master'

Macos ci

See merge request GNOME/gtk!3032

5 years agoMerge branch 'wip/jimmac/headerbar-specialcasing' into 'master'
Matthias Clasen [Wed, 6 Jan 2021 14:40:36 +0000 (14:40 +0000)]
Merge branch 'wip/jimmac/headerbar-specialcasing' into 'master'

Adwaita: specialcase switches and scales for headerbars

Closes #3504

See merge request GNOME/gtk!3043

5 years agoci: Limit macos runs
Matthias Clasen [Wed, 6 Jan 2021 14:36:02 +0000 (09:36 -0500)]
ci: Limit macos runs

We are building the full stack here, which is pretty expensive,
so only do it for merge requests and master.

5 years agoMerge branch 'wip/jimmac/hc-dim-label' into 'master'
Matthias Clasen [Wed, 6 Jan 2021 13:04:24 +0000 (13:04 +0000)]
Merge branch 'wip/jimmac/hc-dim-label' into 'master'

HC: special case .dim-label

Closes #3507

See merge request GNOME/gtk!3042

5 years agoAdwaita: specialcase switches and scales for headerbars
Jakub Steiner [Wed, 6 Jan 2021 12:02:21 +0000 (13:02 +0100)]
Adwaita: specialcase switches and scales for headerbars

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3504

5 years agoHC: special case .dim-label
Jakub Steiner [Wed, 6 Jan 2021 11:46:35 +0000 (12:46 +0100)]
HC: special case .dim-label

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3507

5 years agoMerge branch 'dlech-master-patch-65287' into 'master'
Timm Bäder [Wed, 6 Jan 2021 08:55:57 +0000 (08:55 +0000)]
Merge branch 'dlech-master-patch-65287' into 'master'

doc: fix annotation for GtkCssLocation

See merge request GNOME/gtk!3041

5 years agodoc: fix annotation for GtkCssLocation
David Lechner [Wed, 6 Jan 2021 04:32:09 +0000 (04:32 +0000)]
doc: fix annotation for GtkCssLocation

GtkCssLocation is a type so it should be prefixed with # rather than @.

5 years agomacos: use deprecated NSOnState for older systems
Christian Hergert [Wed, 6 Jan 2021 00:20:46 +0000 (16:20 -0800)]
macos: use deprecated NSOnState for older systems

5 years agomacos: keep array of pasteboard types
Christian Hergert [Tue, 5 Jan 2021 23:24:41 +0000 (15:24 -0800)]
macos: keep array of pasteboard types

To support Sierra, we need to have access to pasteboard types as a
NSString. Constants are provided in later versions of macOS, but we
can emulate that with an array which is initialized on first access.

5 years agogtk: fix brace initialization for bloom filter
Christian Hergert [Wed, 6 Jan 2021 00:01:11 +0000 (16:01 -0800)]
gtk: fix brace initialization for bloom filter

This was breaking CI for macOS and it is a simple enough change to ensure
that just works for the internal buckets.

5 years agomacos: supply NSPasteboardType when necessary
Christian Hergert [Tue, 5 Jan 2021 21:54:07 +0000 (13:54 -0800)]
macos: supply NSPasteboardType when necessary

On older macOS systems, we might need to provide our own typedef
for the NSPasteboardType. It is just a NSString pointer anyway.

5 years agomacos: fix typedef on older macOS
Christian Hergert [Tue, 5 Jan 2021 21:53:22 +0000 (13:53 -0800)]
macos: fix typedef on older macOS

On older systems, we don't have a typedef for gravity. They are a NSString
pointer and we can provide that manually just fine.

5 years agomacos: handle point conversion on older macOS
Christian Hergert [Tue, 5 Jan 2021 21:52:11 +0000 (13:52 -0800)]
macos: handle point conversion on older macOS

On older systems, the availability of some methods seem to be incorrect
based on Apple documentation. This works around the issue by using
the rect conversion on older systems.

5 years agoMerge branch 'media-caps' into 'master'
Matthias Clasen [Tue, 5 Jan 2021 21:34:27 +0000 (21:34 +0000)]
Merge branch 'media-caps' into 'master'

media: Be more specific in our caps

See merge request GNOME/gtk!3037

5 years agoMerge branch 'simplify-toolbar' into 'master'
Matthias Clasen [Tue, 5 Jan 2021 19:35:46 +0000 (19:35 +0000)]
Merge branch 'simplify-toolbar' into 'master'

3to4: Remove GtkToolbar::toolbar_style

See merge request GNOME/gtk!3040

5 years ago3to4: Remove GtkToolbar::toolbar_style
Matthias Clasen [Tue, 5 Jan 2021 18:57:47 +0000 (13:57 -0500)]
3to4: Remove GtkToolbar::toolbar_style

The property was removed (with the rest of the widget),
so keeping it around in the ui file makes no sense.

Testcase included.

5 years agoMerge branch 'ebassi/migrating-clipboard' into 'master'
Matthias Clasen [Tue, 5 Jan 2021 18:41:27 +0000 (18:41 +0000)]
Merge branch 'ebassi/migrating-clipboard' into 'master'

Ebassi/migrating clipboard

See merge request GNOME/gtk!3039

5 years agoMerge branch 'dlech-master-patch-06007' into 'master'
Emmanuele Bassi [Tue, 5 Jan 2021 18:10:59 +0000 (18:10 +0000)]
Merge branch 'dlech-master-patch-06007' into 'master'

docs: fix parameter reference in gtk_bitset_contains()

See merge request GNOME/gtk!3035

5 years agodocs: fix parameter reference in gtk_bitset_contains()
David Lechner [Tue, 5 Jan 2021 05:36:19 +0000 (05:36 +0000)]
docs: fix parameter reference in gtk_bitset_contains()

This fixes an error in the doc comments where the first parameter was
referred to as @bitset instead of @self.

5 years agodocs: Add migration section for GtkClipboard
Emmanuele Bassi [Tue, 5 Jan 2021 16:51:14 +0000 (16:51 +0000)]
docs: Add migration section for GtkClipboard

A simple copy/paste text example, plus directing people towards the
appropriate GType to replace the old convenience API.

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Tue, 5 Jan 2021 16:49:53 +0000 (16:49 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

Matthiasc/for master

See merge request GNOME/gtk!3038

5 years agoUpdated the Romanian Translation
Daniel Șerbănescu [Tue, 5 Jan 2021 16:38:02 +0000 (17:38 +0100)]
Updated the Romanian Translation

5 years agodocs: Preformat some symbols
Emmanuele Bassi [Tue, 5 Jan 2021 16:19:21 +0000 (16:19 +0000)]
docs: Preformat some symbols

5 years agogtk-demo: Small a11y fix
Matthias Clasen [Tue, 5 Jan 2021 16:16:10 +0000 (11:16 -0500)]
gtk-demo: Small a11y fix

Label the entry in the assistant demo.

5 years agoa11y: Only spew help once
Matthias Clasen [Tue, 5 Jan 2021 16:15:33 +0000 (11:15 -0500)]
a11y: Only spew help once

Make GTK_A11Y=help only spew once, and avoid a warning
when we do.

5 years agopopup: Mention the popover arrow in the docs
Matthias Clasen [Tue, 5 Jan 2021 15:59:59 +0000 (10:59 -0500)]
popup: Mention the popover arrow in the docs

Suggested by Jonas.

5 years agoMerge branch 'no-gl-context' into 'master'
Matthias Clasen [Tue, 5 Jan 2021 15:22:09 +0000 (15:22 +0000)]
Merge branch 'no-gl-context' into 'master'

Disable GL support in gstreamer media backend on Windows

See merge request GNOME/gtk!3034

5 years agoMerge branch 'wip/baedert/for-master' into 'master'
Matthias Clasen [Tue, 5 Jan 2021 15:20:25 +0000 (15:20 +0000)]
Merge branch 'wip/baedert/for-master' into 'master'

Wip/baedert/for master

See merge request GNOME/gtk!3029

5 years agomedia: Be more specific in our caps
Matthias Clasen [Tue, 5 Jan 2021 14:21:01 +0000 (09:21 -0500)]
media: Be more specific in our caps

We can only handle 2D textures, so tell gstreamer
about that.

5 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Tue, 5 Jan 2021 14:26:38 +0000 (14:26 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

some docs tweaks

See merge request GNOME/gtk!3036

5 years agodocs: Cosmetics
Matthias Clasen [Sat, 2 Jan 2021 21:34:34 +0000 (16:34 -0500)]
docs: Cosmetics

5 years agodocs: Flesh out Popup layout docs
Matthias Clasen [Tue, 5 Jan 2021 13:20:36 +0000 (08:20 -0500)]
docs: Flesh out Popup layout docs

We have nice illustrations for this, lets use them.

5 years agoUpdate Ukrainian translation
Yuri Chornoivan [Tue, 5 Jan 2021 08:08:44 +0000 (08:08 +0000)]
Update Ukrainian translation

5 years agocsstokenizer: Keep a GString for name parsing around
Timm Bäder [Sun, 3 Jan 2021 21:41:02 +0000 (22:41 +0100)]
csstokenizer: Keep a GString for name parsing around

We only every parse one of those at a time, so keep a GString around for
it. This way we don't have to create a new GString every time we parse
an identifier. Doesn't spare us the strdup though.

5 years agocsstokenizer: Add separate init functions for token types
Timm Bäder [Sun, 3 Jan 2021 20:53:20 +0000 (21:53 +0100)]
csstokenizer: Add separate init functions for token types

Using a variadic function is just awkward there. Use different init
functions and use them as appropriate; we already know which one to call
everywhere.

5 years agobuilder: Remove unused typedef
Timm Bäder [Sun, 3 Jan 2021 11:33:25 +0000 (12:33 +0100)]
builder: Remove unused typedef

5 years agobuilder: Remove unused function prototype
Timm Bäder [Sun, 3 Jan 2021 11:27:32 +0000 (12:27 +0100)]
builder: Remove unused function prototype

5 years agobuilderparser: Use GPtrArray for stack
Timm Bäder [Sun, 3 Jan 2021 11:23:01 +0000 (12:23 +0100)]
builderparser: Use GPtrArray for stack

5 years agogstreamer media backend: Disable OpenGL on Windows
Chun-wei Fan [Tue, 5 Jan 2021 06:30:08 +0000 (14:30 +0800)]
gstreamer media backend: Disable OpenGL on Windows

...for at least WGL, since we are not allowed to use wglMakeCurrent(),
which is eventually called by gdk_gl_context_make_current() to share WGL
contexts across different threads, which will cause a crash.

This means, we cannot enable WGL in the gstreamer media backend on
Windows.

5 years agoMerge branch 'matthiasc/gl-media-stream' into 'master'
Matthias Clasen [Tue, 5 Jan 2021 00:54:37 +0000 (00:54 +0000)]
Merge branch 'matthiasc/gl-media-stream' into 'master'

Use GL in the gstreamer media backend

See merge request GNOME/gtk!3027

5 years agogtk-demo: Use GtkVideo in the fishbowl
Matthias Clasen [Mon, 4 Jan 2021 23:26:29 +0000 (18:26 -0500)]
gtk-demo: Use GtkVideo in the fishbowl

The demo is called 'Video', so we should actually
use a GtkVideo widget. Doing things this way has
the advantage that we get GL support, which wasn't
working with GtkPicture.

5 years agomedia: Only force GL if we're using a GL renderer
Matthias Clasen [Fri, 1 Jan 2021 17:12:35 +0000 (12:12 -0500)]
media: Only force GL if we're using a GL renderer

When we are not using a GL renderer, getting GL textures
is no advantage to us, so don't make gstreamer send its
frames as GL memory in this case.

5 years agomedia: Convince gstreamer to deliver GL memory
Matthias Clasen [Fri, 1 Jan 2021 16:31:49 +0000 (11:31 -0500)]
media: Convince gstreamer to deliver GL memory

Use a glsinkbin to make gstreamer deliver GL memory.

5 years agomedia: Add support for OpenGL to GtkGstMediaFile
Benjamin Otte [Tue, 29 Dec 2020 19:11:51 +0000 (14:11 -0500)]
media: Add support for OpenGL to GtkGstMediaFile

5 years agovideo: Realize the media stream before setting a file
Matthias Clasen [Tue, 29 Dec 2020 20:55:28 +0000 (15:55 -0500)]
video: Realize the media stream before setting a file

This makes it so that we obtain a GL context before
creating the GstSink, so we at least advertise our
ability to handle GL buffer.

Gstreamer still won't send us any.

5 years agoMerge branch 'wip/jimmac/popover-separators' into 'master'
Matthias Clasen [Mon, 4 Jan 2021 18:14:00 +0000 (18:14 +0000)]
Merge branch 'wip/jimmac/popover-separators' into 'master'

Adwaita: increase cotrast of popover separators

Closes #3535

See merge request GNOME/gtk!3033

5 years agoAdwaita: increase contrast of popover separators
Jakub Steiner [Mon, 4 Jan 2021 16:53:40 +0000 (17:53 +0100)]
Adwaita: increase contrast of popover separators

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3535

5 years agoMerge branch 'window-geometry-info' into 'master'
Matthias Clasen [Mon, 4 Jan 2021 13:55:08 +0000 (13:55 +0000)]
Merge branch 'window-geometry-info' into 'master'

gtk/window: remove GtkWindowGeometryInfo from public header file

See merge request GNOME/gtk!3028

5 years agoUpdated Lithuanian translation
Aurimas Černius [Mon, 4 Jan 2021 12:09:40 +0000 (14:09 +0200)]
Updated Lithuanian translation

5 years agoPass coretext=enabled to harfbuzz
Matthias Clasen [Mon, 4 Jan 2021 02:11:56 +0000 (21:11 -0500)]
Pass coretext=enabled to harfbuzz

When we use harfbuzz as a subproject on OS X,
we (or rather, pango) need coretext support.

5 years agoFix the cairo build on OS X
Matthias Clasen [Sun, 3 Jan 2021 18:46:34 +0000 (13:46 -0500)]
Fix the cairo build on OS X

Change the subproject to point to a branch that includes
an OS X build fix. Once
https://gitlab.freedesktop.org/cairo/cairo/-/issues/441
is fixed, we should switch back to master.

5 years agoci: Disable pixman tests on MacOS
Matthias Clasen [Sun, 3 Jan 2021 18:23:45 +0000 (13:23 -0500)]
ci: Disable pixman tests on MacOS

The pixman tests fail to build, and I don't have
the stamina to fix all sub-sub-projects, so just
disable the tests.

5 years agoci: Fix the harfbuzz build on MacOS
Matthias Clasen [Sun, 3 Jan 2021 18:13:27 +0000 (13:13 -0500)]
ci: Fix the harfbuzz build on MacOS

We need to force c++11 at the toplevel here, since
meson can't deal with per-project compiler choice.

5 years agoprinting: Remove cairo header checks
Matthias Clasen [Sun, 3 Jan 2021 16:59:14 +0000 (11:59 -0500)]
printing: Remove cairo header checks

cc.has_header doesn't work with subprojects, and all this
check does is to make the build fail, so we can just...
let the build fail instead.

5 years agoprinting: cairo-pdf is needed
Matthias Clasen [Sun, 3 Jan 2021 16:24:26 +0000 (11:24 -0500)]
printing: cairo-pdf is needed

The print backends need cairos pdf support, which is
contingent on zlib, so enable that when using cairo
as a subproject, as we do in ci for MacOS.

5 years agoci: Add a macos build
Matthias Clasen [Sun, 3 Jan 2021 03:34:52 +0000 (22:34 -0500)]
ci: Add a macos build

Most of this is cribbed from glib.

We don't use COMMON_MESON_FLAGS here, since disabling
-Werror one subproject at a time is too painful for
all the promoted sub-sub-projects. This needs a better
solution in meson.

Since this is a full rebuild of the entire stack, limit
this to master and merge requests.

5 years agox11: fix crash on idle compute size without layout
Rafostar [Sun, 3 Jan 2021 17:02:31 +0000 (18:02 +0100)]
x11: fix crash on idle compute size without layout

On x11 toplevel layout is not created before toplevel
is presented, but GTK tries to update it on idle
which leads to a crash due to accessing property
of undefined object. Treat soon to be created layout
as a layout with default values upon creation (resizable).

5 years agoUpdate German translation
Philipp Kiemle [Sun, 3 Jan 2021 13:41:25 +0000 (13:41 +0000)]
Update German translation

5 years agoUpdate German translation
Philipp Kiemle [Sun, 3 Jan 2021 13:40:13 +0000 (13:40 +0000)]
Update German translation

5 years agomessagedialog: Modernize source file
Timm Bäder [Sun, 3 Jan 2021 09:17:18 +0000 (10:17 +0100)]
messagedialog: Modernize source file

Move vfunc implementations above class_init, remove unneeded prototypes,
properly indent everything and remove trailing whitespace

5 years agowidget: Refactor gtk_widget_class_set_template()
Timm Bäder [Sun, 3 Jan 2021 07:45:30 +0000 (08:45 +0100)]
widget: Refactor gtk_widget_class_set_template()

Don't call gbytes_get_data/get_size so often and exit early if the given
bytes is already precompiled.

5 years agowidget: Inline setup_template_child() into only caller
Timm Bäder [Sun, 3 Jan 2021 06:26:44 +0000 (07:26 +0100)]
widget: Inline setup_template_child() into only caller

This is a pretty short and self-contained function.

5 years agoicontheme: Make a parameter const
Timm Bäder [Thu, 31 Dec 2020 11:58:30 +0000 (12:58 +0100)]
icontheme: Make a parameter const

5 years agosettings: Overallocate property_values
Timm Bäder [Thu, 31 Dec 2020 11:48:41 +0000 (12:48 +0100)]
settings: Overallocate property_values

Instead of walking the pspecs twice and checking for the owner_type,
just allocate n_pspecs entries. They are the same value right now
anyway, but even if they aren't it doesn't hurt to have a few extra ones
allocated.

5 years agosettings: Load keyfiles ourselves
Timm Bäder [Thu, 31 Dec 2020 11:40:41 +0000 (12:40 +0100)]
settings: Load keyfiles ourselves

This does not change anything in the case where the .init file does not
exist. We still hit the disk once. Otherwise, we now only hit it once
instead of twice and avoid a potential race-condition.

5 years agowidget: Use gtk_widget_get_native() in get_surface_allocation()
Timm Bäder [Thu, 31 Dec 2020 07:02:10 +0000 (08:02 +0100)]
widget: Use gtk_widget_get_native() in get_surface_allocation()

5 years agogtksettings: Remove unused defines
Timm Bäder [Tue, 29 Dec 2020 14:19:35 +0000 (15:19 +0100)]
gtksettings: Remove unused defines

5 years agorender: Inline function into only caller
Timm Bäder [Sun, 27 Dec 2020 20:35:21 +0000 (21:35 +0100)]
render: Inline function into only caller

5 years agoframe: Remove unnecessary function
Timm Bäder [Sun, 27 Dec 2020 20:14:49 +0000 (21:14 +0100)]
frame: Remove unnecessary function

Just call the vfunc directly in the only place we used to call the old
wrapper

5 years agogesture: Replace tabs
Timm Bäder [Sun, 27 Dec 2020 20:06:51 +0000 (21:06 +0100)]
gesture: Replace tabs

5 years agobox: Replace tabs with spaces
Timm Bäder [Sun, 27 Dec 2020 17:14:57 +0000 (18:14 +0100)]
box: Replace tabs with spaces

5 years agoscrolledwindow: Use g_clear_handle_id
Timm Bäder [Sun, 27 Dec 2020 17:11:29 +0000 (18:11 +0100)]
scrolledwindow: Use g_clear_handle_id

5 years agoviewport: Small cleanup
Timm Bäder [Sun, 27 Dec 2020 17:05:44 +0000 (18:05 +0100)]
viewport: Small cleanup

No need to check for visibility before calling gtk_widget_measure().

5 years agowidget: Move quark_builder_set_id declaration to other GQuarks
Timm Bäder [Sun, 27 Dec 2020 16:11:12 +0000 (17:11 +0100)]
widget: Move quark_builder_set_id declaration to other GQuarks

5 years agowidget: Re-arrange some more functions
Timm Bäder [Sun, 27 Dec 2020 12:23:11 +0000 (13:23 +0100)]
widget: Re-arrange some more functions